- /* sxbscvds.cpp by K.Tsuru */
- // function ID 3557 BRADIX
- /***************************************************************
- SN library
- SDecimal class
- BRADIX ---> DRADIX radix conversion
- A radix conversion by binary splitting method ver. 2.31
- ***************************************************************/
-
- #ifndef SN_H
- #include "sn.h"
- #endif
-
- static const fType* pf;
-
- class BSConvSDecimalToSDouble : public BinarySplittingA1C<SLong> {
- public:
- BSConvSDecimalToSDouble(long upto, long precision) : BinarySplittingA1C<SLong>(upto, precision){
- putTogether();
- }
- void setAC(long k, SLong& a, SLong& c) {
- a.SetInt(pf[k]);
- c = k ? BRADIX : ONE;
- }
- };
-
- SDouble BS_ConvSDecToSDbl(const SDecimal& x) {
- pf = x.ReadFigures();
- SDouble temp;
- long prec = long(temp.Size()) * DFIGURES;
- long L = x.Last();
- BSConvSDecimalToSDouble s(L, prec);
-
- return s.getValue();
- }
sxbscvds.cpp : last modifiled at 2017/11/06 11:03:07(904 bytes)
created at 2017/11/06 15:57:02
The creation time of this html file is 2017/11/06 16:00:48 (Mon Nov 06 16:00:48 2017).